package com.dao.hm;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.entity.Solicitude;

public interface SolicitudeDAO extends CrudRepository<Solicitude, Long>{
	@Query("from Solicitude s where s.logic=1")
	public Page<Solicitude> queryNoCriteria(Pageable p);
	
	@Query("from Solicitude s where s.logic=1 and s.type=?1")
	public Page<Solicitude> queryFast(String type,Pageable p);
	
	@Query("from Solicitude s where s.logic=1 and s.theme like ?1")
	public Page<Solicitude> queryByTheme(String theme,Pageable p);

}
